import http from "@/api";
import { PORT1 } from "@/api/config/servicePort";

// 获取课程列表
export const GetCourseList = (params: any) => {
	return http.get(PORT1 + `/admin/course/GetCourseList`, params, { headers: { noLoading: params.noLoading === undefined } });
};

// 获取课程详情
export const GetCourseInfo = (params: any) => {
	return http.get(PORT1 + `/admin/course/GetCourseInfo`, params);
};

// 添加课程
export const AddCourse = (params: any) => {
	return http.post(PORT1 + `/admin/course/AddCourse`, params);
};

// 修改课程
export const SaveCourse = (params: any) => {
	return http.post(PORT1 + `/admin/course/SaveCourse`, params);
};

// 删除课程
export const DeleteCourse = (params: any) => {
	return http.post(PORT1 + `/admin/course/DeleteCourse`, params);
};

// 获取班级列表
export const GetArrangeList = (params: any) => {
	return http.get(PORT1 + `/admin/arrange/GetArrangeList`, params);
};

// 获取班级详情
export const GetArrangeInfo = (params: any) => {
	return http.get(PORT1 + `/admin/arrange/GetArrangeInfo`, params);
};

// 添加班级
export const AddArrange = (params: any) => {
	return http.post(PORT1 + `/admin/arrange/AddArrange`, params);
};

// 修改班级
export const SaveArrange = (params: any) => {
	return http.post(PORT1 + `/admin/arrange/SaveArrange`, params);
};

// 删除班级
export const DeleteArrange = (params: any) => {
	return http.post(PORT1 + `/admin/arrange/DeleteArrange`, params);
};

// 上下架班级
export const SetArrangeSaleStatus = (params: any) => {
	return http.post(PORT1 + `/admin/arrange/SetArrangeSaleStatus`, params);
};

// 获取订单列表
export const GetOrderList = (params: any) => {
	return http.get(PORT1 + `/admin/order/GetOrderList`, params);
};